package string;

public class StringEquals {
    public static void main(String[] args) {
        String s1 = new String("ABC");
        String s2 = new String("ABC");
        System.out.println(s1 == s2);
        System.out.println(s1.equals(s2));

        String s3 = "ABC";
        String s4 = "ABC";
        System.out.println(s3 == s4);
        System.out.println(s3.equals(s4));

        String s5 = "Demo";
        String s6 = "demo";
        //equals相等  Ignore忽略  Case大小写
        System.out.println(s5.equalsIgnoreCase(s6));
    }
}
